library(jpeg)
img <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
P <- map(.x = 1:4,
.f = function(ii) {
ggplot() +
annotation_raster(img,
xmin = 0, xmax = dim(img)[2],
ymin = 0, ymax = dim(img)[1]) +
xlim(c(0, dim(img)[2])) +
ylim(c(0, dim(img)[1])) +
coord_equal() +
ggpubr::theme_transparent()
})
wrap_plots(P) +
plot_annotation(tag_levels = 'a', tag_suffix = ".")